

**************************************
**********CONJOINT ANALYSIS***********
**************************************

clear all
*cd "" set working directory
use "goodpolitician.dta"


* MODELS AND ACME

*SET THE REFERENCE CATEGORIES
fvset base 1 SESSO 
fvset base 7 POS 
fvset base 2 STILE 
fvset base 2 CAPA 
fvset base 2 INTE 
fvset base 1 COMPE 
fvset base 2 VISI 
fvset base 1 LEAD 

*CHOICE (WEIGHTED)
quietly reg CHO i.SESSO i.POS i.STILE i.CAPA i.INTE i.COMPE i.VISI i.LEAD [pw = weight1_istr_w2], vce(cluster id)

*AMES
margins, dydx(SESSO POS STILE CAPA INTE COMPE VISI LEAD)

*MODELS FOR POPULISTS AND NON-POPULISTS
quietly reg CHO i.SESSO i.POS i.STILE i.CAPA i.INTE i.COMPE i.VISI i.LEAD if popmedian2==1 [pw = weight1_istr_w2], vce(cluster id)

quietly reg CHO i.SESSO i.POS i.STILE i.CAPA i.INTE i.COMPE i.VISI i.LEAD if popmedian2==0 [pw = weight1_istr_w2], vce(cluster id)

*AMES
margins, dydx(SESSO POS STILE CAPA INTE COMPE VISI LEAD)
